BaseComplexIndicator

StockSharp.Algo.Indicators

The base indicator, built in form of several indicators combination.

Inherits: BaseIndicator

Implements: IComplexIndicator, IIndicator, IAsyncPersistable

Constructors

BaseComplexIndicator
protected BaseComplexIndicator(IIndicator[] innerIndicators)
baseComplexIndicator = BaseComplexIndicator(innerIndicators)

Initializes a new instance of the BaseComplexIndicator.

innerIndicators
Embedded indicators.

Properties

InnerIndicators
public IReadOnlyList<IIndicator> InnerIndicators { get; }
value = baseComplexIndicator.InnerIndicators

Embedded indicators.

Mode
public ComplexIndicatorModes Mode { get; protected set; }
value = baseComplexIndicator.Mode
baseComplexIndicator.Mode = value

Embedded indicators processing mode. The default equals to Parallel.

NumValuesToInitialize
public override int NumValuesToInitialize { get; }
value = baseComplexIndicator.NumValuesToInitialize

Number of values that need to be processed in order for the indicator to initialize (be IsFormed equals ). if undefined.

Methods

AddInner
protected void AddInner(IIndicator inner)
baseComplexIndicator.AddInner(inner)

Add to InnerIndicators.

inner
Indicator.
CalcIsFormed
protected override bool CalcIsFormed()
result = baseComplexIndicator.CalcIsFormed()

Calc IsFormed.

Returns: IsFormed

ClearInner
protected void ClearInner()
baseComplexIndicator.ClearInner()

Clear InnerIndicators.

CreateValue
protected abstract TValue CreateValue(DateTime time)
result = baseComplexIndicator.CreateValue(time)

Create .

time
Time
LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = baseComplexIndicator.LoadAsync(storage, cancellationToken)

Load settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

OnCreateValue
protected override IIndicatorValue OnCreateValue(DateTime time)
result = baseComplexIndicator.OnCreateValue(time)

Create a new instance of IIndicatorValue for the specified time.

time
Time

Returns: IIndicatorValue

OnProcess
protected override IIndicatorValue OnProcess(IIndicatorValue input)
result = baseComplexIndicator.OnProcess(input)

To handle the input value.

input
The input value.

Returns: The resulting value.

PrepareAsync
public override ValueTask PrepareAsync(CancellationToken cancellationToken)
result = baseComplexIndicator.PrepareAsync(cancellationToken)

Prepare the indicator for IIndicatorValue): do what has to be awaited before the first value.

cancellationToken
CancellationToken

Returns: ValueTask

Process
public override IIndicatorValue Process(IIndicatorValue input)
result = baseComplexIndicator.Process(input)

To handle the input value.

input
The input value.

Returns: The new value of the indicator.

RemoveInner
protected void RemoveInner(IIndicator inner)
baseComplexIndicator.RemoveInner(inner)

Remove from InnerIndicators.

inner
Indicator.
SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = baseComplexIndicator.SaveAsync(storage, cancellationToken)

Save settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task